angular.module('baisonLanguage', [])
//获取语言包
        .factory('Language', ['$http', function ($http) {
                var l = $api.getStorage('language');
                if (l == undefined || l == '') {
                    var lang = 'zh_cn';
                } else {
                    var lang = l;
                }

                return function () {
                    return $http.get('./language/' + lang + '.json');
                };
            }
        ])
    .factory('LanguageSet', ['$http', function ($http) {
        var language_set = function (language){
            if (language == undefined || language == '') {
                var lang = 'zh_cn';
            } else {
                var lang = language;
            }
            return $http.get('./language/' + lang + '.json');
        };

        return {language_set:language_set};
    }
    ])
        .factory('purviewInitial', ['$http', function ($http) {
                //var lang = 'purview';
                return function (lang) {
                    return $http.get('./purview/' + lang + '.json');
                };
            }
        ]);